// Copyright DustedPixels.com 2008. All rights reserved.

package kroff.opt;

/**
 * After inlining incremetor_run
 */
public final class TopLevel6 {

  private final Runnable thousandToOne_onceInThousand;
  private int thousandToOne_counter = 0;
  
  private int incrementor_counter_value;
  
  
  public TopLevel6(Runnable external) {
    this.thousandToOne_onceInThousand = external;
  }
  
  public void run() {
    thousandToOne_run();
  }

  private void thousandToOne_run() {
    incrementor_counter_value++;
    if (thousandToOne_counter == 0) {
      thousandToOne_onceInThousand.run();
    }
    thousandToOne_counter = (thousandToOne_counter + 1) % 1000;
  }
}
